package com.bos.data.repositories.jpa;

import com.bos.data.model.ProjectItemModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface BosProjectItemJPARepository extends JpaRepository<ProjectItemModel, Integer>, JpaSpecificationExecutor<ProjectItemModel> {
    @Modifying
    @Query("update ProjectItemModel a set a.value=?2 where a.id=?1")
    int updProItem(int id,String value);

    @Modifying
    @Query("delete from ProjectItemModel a where  a.proitid=?1")
    int delByProitid(int proitid);
}
